import { request } from "@ruifox-cms/utils";

// 获取表单答卷详情
export function selectPaperResult(params) {
  return request({
    url: "/form/api/paperResult/select",
    method: "get",
    params,
  });
}

// 校验表单
export function checkForm(data) {
  return request({
    url: '/form/api/paper/checkForm',
    method: 'post',
    data
  })
}

// 获取表单数据
export function getFormData(params) {
  return request({
    url: '/form/api/paper/getCurFormInfo',
    method: 'get',
    params
  })
}

// 提交表单
export function insertPaperResult(data) {
  return request({
    url: '/form/api/paperResult/insert',
    method: 'post',
    data
  })
}

// 填写记录(自己的)
export function selectPaperResultList(params) {
  return request({
    url: '/form/api/paperResult/selectList',
    method: 'get',
    params
  })
}
//查询表单
export function selectPaper(params) {
  return request({
    url: '/form/api/paper/select',
    method: 'get',
    params
  })
}
//查询当前用户的填写记录
export function selectListPaperResult(params) {
  return request({
    url: '/form/api/paperResult/selectList',
    method: 'get',
    params
  })
}
